package com.fili.core.storage;

import java.io.Serializable;

/**
 * Created by Claudiu-Florin FILIMON
 * Date: Oct 14, 2006
 * Time: 12:03:52 PM
 */
public class StorageItem implements Serializable, Cloneable
{
    public static final int PROBE_AIR_TEMP = 0;
    public static final int PROBE_WOOD_TEMP = 2;
    public static final int PROBE_WOOD_HUMID = 8;

    public int dryID;
    public int[] probes;
    public int avgAir;
    public int avgWood;


    public int runningProgram;
    public int thickness;
    public int finalHumidity;
    public int currentTemp;
    public int wantedTemp;
    public int currentUGL;
    public int wantedUGL;
    public int currentHumid;
    public int wantedHumid;
    public int phase;
    public int RH;

    public boolean bFan;
    public boolean bHeat;
    public boolean bLid;
    public boolean bHumid;


    public StorageItem()
    {
        probes = new int[14];
    }


    public StorageItem clone()
    {
        StorageItem item;
        try
        {
            item = (StorageItem) super.clone();
        }
        catch (CloneNotSupportedException e)
        {
            e.printStackTrace();
            item = new StorageItem();
        }

        item.dryID = dryID;
        item.probes = new int[probes.length];
        System.arraycopy(probes, 0, item.probes, 0, probes.length);
        item.avgAir = avgAir;
        item.avgWood = avgWood;

        item.runningProgram = runningProgram;
        item.thickness = thickness;
        item.finalHumidity = finalHumidity;
        item.currentTemp = currentTemp;
        item.wantedTemp = wantedTemp;
        item.currentUGL = currentUGL;
        item.wantedUGL = wantedUGL;
        item.currentHumid = currentHumid;
        item.wantedHumid = wantedHumid;
        item.phase = phase;
        item.RH = RH;

        item.bFan = bFan;
        item.bHeat = bHeat;
        item.bLid = bLid;
        item.bHumid = bHumid;

        return item;
    }
}
